package org.qiuqiu.vo;

import java.util.ArrayList;
import java.util.List;

public class RoleExample {
    protected String orderByClause;
	protected boolean distinct;
	protected List<Criteria> oredCriteria;

	public RoleExample() {
		oredCriteria = new ArrayList<Criteria>();
	}

	public void setOrderByClause(String orderByClause) {
		this.orderByClause = orderByClause;
	}

	public String getOrderByClause() {
		return orderByClause;
	}

	public void setDistinct(boolean distinct) {
		this.distinct = distinct;
	}

	public boolean isDistinct() {
		return distinct;
	}

	public List<Criteria> getOredCriteria() {
		return oredCriteria;
	}

	public void or(Criteria criteria) {
		oredCriteria.add(criteria);
	}

	public Criteria or() {
		Criteria criteria = createCriteriaInternal();
		oredCriteria.add(criteria);
		return criteria;
	}

	public Criteria createCriteria() {
		Criteria criteria = createCriteriaInternal();
		if (oredCriteria.size() == 0) {
			oredCriteria.add(criteria);
		}
		return criteria;
	}

	protected Criteria createCriteriaInternal() {
		Criteria criteria = new Criteria();
		return criteria;
	}

	public void clear() {
		oredCriteria.clear();
		orderByClause = null;
		distinct = false;
	}

	protected abstract static class GeneratedCriteria {
		protected List<Criterion> criteria;

		protected GeneratedCriteria() {
			super();
			criteria = new ArrayList<Criterion>();
		}

		public boolean isValid() {
			return criteria.size() > 0;
		}

		public List<Criterion> getAllCriteria() {
			return criteria;
		}

		public List<Criterion> getCriteria() {
			return criteria;
		}

		protected void addCriterion(String condition) {
			if (condition == null) {
				throw new RuntimeException("Value for condition cannot be null");
			}
			criteria.add(new Criterion(condition));
		}

		protected void addCriterion(String condition, Object value,
				String property) {
			if (value == null) {
				throw new RuntimeException("Value for " + property
						+ " cannot be null");
			}
			criteria.add(new Criterion(condition, value));
		}

		protected void addCriterion(String condition, Object value1,
				Object value2, String property) {
			if (value1 == null || value2 == null) {
				throw new RuntimeException("Between values for " + property
						+ " cannot be null");
			}
			criteria.add(new Criterion(condition, value1, value2));
		}

		public Criteria andRoleidIsNull() {
			addCriterion("roleid is null");
			return (Criteria) this;
		}

		public Criteria andRoleidIsNotNull() {
			addCriterion("roleid is not null");
			return (Criteria) this;
		}

		public Criteria andRoleidEqualTo(Integer value) {
			addCriterion("roleid =", value, "roleid");
			return (Criteria) this;
		}

		public Criteria andRoleidNotEqualTo(Integer value) {
			addCriterion("roleid <>", value, "roleid");
			return (Criteria) this;
		}

		public Criteria andRoleidGreaterThan(Integer value) {
			addCriterion("roleid >", value, "roleid");
			return (Criteria) this;
		}

		public Criteria andRoleidGreaterThanOrEqualTo(Integer value) {
			addCriterion("roleid >=", value, "roleid");
			return (Criteria) this;
		}

		public Criteria andRoleidLessThan(Integer value) {
			addCriterion("roleid <", value, "roleid");
			return (Criteria) this;
		}

		public Criteria andRoleidLessThanOrEqualTo(Integer value) {
			addCriterion("roleid <=", value, "roleid");
			return (Criteria) this;
		}

		public Criteria andRoleidIn(List<Integer> values) {
			addCriterion("roleid in", values, "roleid");
			return (Criteria) this;
		}

		public Criteria andRoleidNotIn(List<Integer> values) {
			addCriterion("roleid not in", values, "roleid");
			return (Criteria) this;
		}

		public Criteria andRoleidBetween(Integer value1, Integer value2) {
			addCriterion("roleid between", value1, value2, "roleid");
			return (Criteria) this;
		}

		public Criteria andRoleidNotBetween(Integer value1, Integer value2) {
			addCriterion("roleid not between", value1, value2, "roleid");
			return (Criteria) this;
		}

		public Criteria andRolenameIsNull() {
			addCriterion("rolename is null");
			return (Criteria) this;
		}

		public Criteria andRolenameIsNotNull() {
			addCriterion("rolename is not null");
			return (Criteria) this;
		}

		public Criteria andRolenameEqualTo(String value) {
			addCriterion("rolename =", value, "rolename");
			return (Criteria) this;
		}

		public Criteria andRolenameNotEqualTo(String value) {
			addCriterion("rolename <>", value, "rolename");
			return (Criteria) this;
		}

		public Criteria andRolenameGreaterThan(String value) {
			addCriterion("rolename >", value, "rolename");
			return (Criteria) this;
		}

		public Criteria andRolenameGreaterThanOrEqualTo(String value) {
			addCriterion("rolename >=", value, "rolename");
			return (Criteria) this;
		}

		public Criteria andRolenameLessThan(String value) {
			addCriterion("rolename <", value, "rolename");
			return (Criteria) this;
		}

		public Criteria andRolenameLessThanOrEqualTo(String value) {
			addCriterion("rolename <=", value, "rolename");
			return (Criteria) this;
		}

		public Criteria andRolenameLike(String value) {
			addCriterion("rolename like", value, "rolename");
			return (Criteria) this;
		}

		public Criteria andRolenameNotLike(String value) {
			addCriterion("rolename not like", value, "rolename");
			return (Criteria) this;
		}

		public Criteria andRolenameIn(List<String> values) {
			addCriterion("rolename in", values, "rolename");
			return (Criteria) this;
		}

		public Criteria andRolenameNotIn(List<String> values) {
			addCriterion("rolename not in", values, "rolename");
			return (Criteria) this;
		}

		public Criteria andRolenameBetween(String value1, String value2) {
			addCriterion("rolename between", value1, value2, "rolename");
			return (Criteria) this;
		}

		public Criteria andRolenameNotBetween(String value1, String value2) {
			addCriterion("rolename not between", value1, value2, "rolename");
			return (Criteria) this;
		}

		public Criteria andRoledecIsNull() {
			addCriterion("roledec is null");
			return (Criteria) this;
		}

		public Criteria andRoledecIsNotNull() {
			addCriterion("roledec is not null");
			return (Criteria) this;
		}

		public Criteria andRoledecEqualTo(String value) {
			addCriterion("roledec =", value, "roledec");
			return (Criteria) this;
		}

		public Criteria andRoledecNotEqualTo(String value) {
			addCriterion("roledec <>", value, "roledec");
			return (Criteria) this;
		}

		public Criteria andRoledecGreaterThan(String value) {
			addCriterion("roledec >", value, "roledec");
			return (Criteria) this;
		}

		public Criteria andRoledecGreaterThanOrEqualTo(String value) {
			addCriterion("roledec >=", value, "roledec");
			return (Criteria) this;
		}

		public Criteria andRoledecLessThan(String value) {
			addCriterion("roledec <", value, "roledec");
			return (Criteria) this;
		}

		public Criteria andRoledecLessThanOrEqualTo(String value) {
			addCriterion("roledec <=", value, "roledec");
			return (Criteria) this;
		}

		public Criteria andRoledecLike(String value) {
			addCriterion("roledec like", value, "roledec");
			return (Criteria) this;
		}

		public Criteria andRoledecNotLike(String value) {
			addCriterion("roledec not like", value, "roledec");
			return (Criteria) this;
		}

		public Criteria andRoledecIn(List<String> values) {
			addCriterion("roledec in", values, "roledec");
			return (Criteria) this;
		}

		public Criteria andRoledecNotIn(List<String> values) {
			addCriterion("roledec not in", values, "roledec");
			return (Criteria) this;
		}

		public Criteria andRoledecBetween(String value1, String value2) {
			addCriterion("roledec between", value1, value2, "roledec");
			return (Criteria) this;
		}

		public Criteria andRoledecNotBetween(String value1, String value2) {
			addCriterion("roledec not between", value1, value2, "roledec");
			return (Criteria) this;
		}

		public Criteria andUseridIsNull() {
			addCriterion("userid is null");
			return (Criteria) this;
		}

		public Criteria andUseridIsNotNull() {
			addCriterion("userid is not null");
			return (Criteria) this;
		}

		public Criteria andUseridEqualTo(Integer value) {
			addCriterion("userid =", value, "userid");
			return (Criteria) this;
		}

		public Criteria andUseridNotEqualTo(Integer value) {
			addCriterion("userid <>", value, "userid");
			return (Criteria) this;
		}

		public Criteria andUseridGreaterThan(Integer value) {
			addCriterion("userid >", value, "userid");
			return (Criteria) this;
		}

		public Criteria andUseridGreaterThanOrEqualTo(Integer value) {
			addCriterion("userid >=", value, "userid");
			return (Criteria) this;
		}

		public Criteria andUseridLessThan(Integer value) {
			addCriterion("userid <", value, "userid");
			return (Criteria) this;
		}

		public Criteria andUseridLessThanOrEqualTo(Integer value) {
			addCriterion("userid <=", value, "userid");
			return (Criteria) this;
		}

		public Criteria andUseridIn(List<Integer> values) {
			addCriterion("userid in", values, "userid");
			return (Criteria) this;
		}

		public Criteria andUseridNotIn(List<Integer> values) {
			addCriterion("userid not in", values, "userid");
			return (Criteria) this;
		}

		public Criteria andUseridBetween(Integer value1, Integer value2) {
			addCriterion("userid between", value1, value2, "userid");
			return (Criteria) this;
		}

		public Criteria andUseridNotBetween(Integer value1, Integer value2) {
			addCriterion("userid not between", value1, value2, "userid");
			return (Criteria) this;
		}

		public Criteria andRolestatusIsNull() {
			addCriterion("rolestatus is null");
			return (Criteria) this;
		}

		public Criteria andRolestatusIsNotNull() {
			addCriterion("rolestatus is not null");
			return (Criteria) this;
		}

		public Criteria andRolestatusEqualTo(Integer value) {
			addCriterion("rolestatus =", value, "rolestatus");
			return (Criteria) this;
		}

		public Criteria andRolestatusNotEqualTo(Integer value) {
			addCriterion("rolestatus <>", value, "rolestatus");
			return (Criteria) this;
		}

		public Criteria andRolestatusGreaterThan(Integer value) {
			addCriterion("rolestatus >", value, "rolestatus");
			return (Criteria) this;
		}

		public Criteria andRolestatusGreaterThanOrEqualTo(Integer value) {
			addCriterion("rolestatus >=", value, "rolestatus");
			return (Criteria) this;
		}

		public Criteria andRolestatusLessThan(Integer value) {
			addCriterion("rolestatus <", value, "rolestatus");
			return (Criteria) this;
		}

		public Criteria andRolestatusLessThanOrEqualTo(Integer value) {
			addCriterion("rolestatus <=", value, "rolestatus");
			return (Criteria) this;
		}

		public Criteria andRolestatusIn(List<Integer> values) {
			addCriterion("rolestatus in", values, "rolestatus");
			return (Criteria) this;
		}

		public Criteria andRolestatusNotIn(List<Integer> values) {
			addCriterion("rolestatus not in", values, "rolestatus");
			return (Criteria) this;
		}

		public Criteria andRolestatusBetween(Integer value1, Integer value2) {
			addCriterion("rolestatus between", value1, value2, "rolestatus");
			return (Criteria) this;
		}

		public Criteria andRolestatusNotBetween(Integer value1, Integer value2) {
			addCriterion("rolestatus not between", value1, value2, "rolestatus");
			return (Criteria) this;
		}
	}

	public static class Criterion {
		private String condition;
		private Object value;
		private Object secondValue;
		private boolean noValue;
		private boolean singleValue;
		private boolean betweenValue;
		private boolean listValue;
		private String typeHandler;

		public String getCondition() {
			return condition;
		}

		public Object getValue() {
			return value;
		}

		public Object getSecondValue() {
			return secondValue;
		}

		public boolean isNoValue() {
			return noValue;
		}

		public boolean isSingleValue() {
			return singleValue;
		}

		public boolean isBetweenValue() {
			return betweenValue;
		}

		public boolean isListValue() {
			return listValue;
		}

		public String getTypeHandler() {
			return typeHandler;
		}

		protected Criterion(String condition) {
			super();
			this.condition = condition;
			this.typeHandler = null;
			this.noValue = true;
		}

		protected Criterion(String condition, Object value, String typeHandler) {
			super();
			this.condition = condition;
			this.value = value;
			this.typeHandler = typeHandler;
			if (value instanceof List<?>) {
				this.listValue = true;
			} else {
				this.singleValue = true;
			}
		}

		protected Criterion(String condition, Object value) {
			this(condition, value, null);
		}

		protected Criterion(String condition, Object value, Object secondValue,
				String typeHandler) {
			super();
			this.condition = condition;
			this.value = value;
			this.secondValue = secondValue;
			this.typeHandler = typeHandler;
			this.betweenValue = true;
		}

		protected Criterion(String condition, Object value, Object secondValue) {
			this(condition, value, secondValue, null);
		}
	}

	/**
     * This class was generated by MyBatis Generator.
     * This class corresponds to the database table role
     *
     * @mbggenerated do_not_delete_during_merge Fri Feb 06 10:29:24 CST 2015
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }
}